const turnPage = {
  methods: {
    //获取表格数据源 其中http代表api接口类, data代表请求接口参数，path代表请求路径
    getTableListData(http, data, path){
      data.page = data.pageNo
      data.pageSize = data.pageSize
      return new Promise(async (resolve, reject) => {
        let tableListData = await http[path](data)
        let dataList = tableListData.data.rows
        let pageNo = tableListData.data.page
        let pageSize = tableListData.data.pageSize
        let total = tableListData.data.totalRows
        resolve({dataList, pageNo, pageSize, total})
      })
    },
  }
}
export default turnPage
